<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app" a="1" b="2">
      <ul>
        <li>{{name}}</li>
        <li>{{mes}}</li>
        <li>{{arr}}</li>
        <li>{{arr1}}</li>
      </ul>
    </div>

    <script src="/dist/vue.js"></script>
    <script>
      const vm = new Vue({
        el: "#app",
        data() {
          return {
            name: "jxw",
            mes: "你好",
            obj: {
              name: "jxw1",
              mes: "你好111",
            },
            arr: [{ a: 1 }, 2],
            arr1:[1,2,3]
          };
        },
      });
      //内置对象 $options
      /* 即:$options = {
            data() {
                return {
                    name:'jxw'
                }
            },
        } */
      /*  console.log(vm)
        console.log(vm.name='jxw1')
         */
      //console.log(vm);
      //vm.arr.push('1')
      //vm.arr.push({a:'b'})
      /*  setTimeout(() => {
        vm.name = "jxw1";
        vm.mes = "123";
        console.log(vm);
      }, 1000); */
      setTimeout(() => {
        
        //debugger
        vm.arr1.push(1,2)
        //vm.$nextTick(()=>);
      }, 1000);
    </script>
  </body>
</html>
